/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.store;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.Param;
import queenb.net.entitybean.C475;
import queenb.web.util.PackageContants;

/**
 *
 * @author Nguyen Hung
 */
public class C475Store extends C475{

    public List<C475> ccurpks_listoftabc475(int pnFH000, int pnFH200,int pvKV303, String pvLOGIN) {
        try {
            DataStatement data = new DataStatement(PackageContants.ccurpks_listoftabc475, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                         new Param(OracleTypes.INTEGER, pvKV303),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(data, C475.class);
        } catch (SQLException ex) {
            Logger.getLogger(C475Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(C475Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(C475Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    public int stdc_tools_inserttabc475(int pnPC475,
            int pnFH000, int pnFH200,String pvCV476,
            String pvCV477, int pnCN478, int pnCN479,int pnCN480,String pvCV481, String pvCV482,String pvLOGIN) {
        DataStatement dataStetament = new DataStatement(PackageContants.stdc_tools_inserttabc475, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.INTEGER, pnPC475),
                     new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvCV476),
                    new Param(OracleTypes.CHAR, pvCV477),
                     new Param(OracleTypes.INTEGER, pnCN478),
                      new Param(OracleTypes.INTEGER, pnCN479),
                       new Param(OracleTypes.INTEGER, pnCN480),
                     new Param(OracleTypes.CHAR, pvCV481),
                      new Param(OracleTypes.CHAR, pvCV482),
                   
                    new Param(OracleTypes.CHAR, pvLOGIN),});
        try {
            return super.update(dataStetament, C475.class);
        } catch (SQLException ex) {
            Logger.getLogger(C475Store.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    public int stdc_tools_stornotabc475(int pnPC475, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.stdc_tools_stornotabc475, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.INTEGER, pnPC475),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.update(dataStatement, C475.class);
        } catch (SQLException ex) {
            Logger.getLogger(C475Store.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }
    
  public List<C475> combcurpks_combtabc475(int pnFH000, int pnFH200, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.combcurpks_combtabc475, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                   //     new Param(OracleTypes.INTEGER, pnPC425),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, C475.class);
        } catch (SQLException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }
}
